Skip to content

Conversation

past-due
Copy link
Contributor

@past-due past-due commented Aug 25, 2025

Port bellard/quickjs dtoa library commits

added new dtoa library to print and parse float64 numbers. It is necessary to fix corner cases (e.g. radix != 10) and to have correct behavior regardless of the libc implementation.

Port of:
bellard/quickjs@9936606
bellard/quickjs@dbbca3d

Includes alternative fix for bellard/quickjs@638ec8c from 0191aea

Remaining TODO items (would appreciate a look @saghul @bnoordhuis):

  • Amalgamation fails due to duplicate symbols (not sure how you'd prefer to fix this?)
  • Codegen update
  • New test error 🤔 (see below - would appreciate a look at this one)
Result: 65/78606 errors, 3796 excluded, 5454 skipped, 2 new
test262/test/built-ins/TypedArrayConstructors/internals/Set/resized-out-of-bounds-to-in-bounds-index.js:18: unexpected error: Test262Error: Expected SameValue(«0», «100») to be true
test262/test/built-ins/TypedArrayConstructors/internals/Set/resized-out-of-bounds-to-in-bounds-index.js:18: strict mode: unexpected error: Test262Error: Expected SameValue(«0», «100») to be true

past-due and others added 4 commits August 25, 2025 14:46
added new dtoa library to print and parse float64 numbers. It is necessary to fix corner cases (e.g. radix != 10) and to have correct behavior regardless of the libc implementation.

Port of:
bellard/quickjs@9936606
bellard/quickjs@dbbca3d

Includes alternative fix for bellard/quickjs@638ec8c from 0191aea

Update CMakeLists.txt and meson.build

Co-Authored-By: Fabrice Bellard <[email protected]>
@bnoordhuis
Copy link
Contributor

I have a fix for the first item in bnoordhuis/quickjs@2c073d7 that you can cherry-pick.

@saghul
Copy link
Contributor

saghul commented Sep 1, 2025

Can you run make gen? Looks like we're one bug away!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants